package ni;

import java.net.DatagramSocket;

import main.ChatNI;

/**
 * Abstract class implemented by TcpReceiver and TcpSender
 * Contains the commons fields and methods
 * Package  ni
 * Project ChatSystemG5 - INSA 4INFOA1 - 2013/2014
 * @author Thomas Vuillemin Martin Conant
 */
public abstract class Tcp extends Thread{

	protected int port;
	
	/**
	 * Constructor which set the port and the ni fields
	 * @param ni the object ChatNI
	 */
	public Tcp(ChatNI ni) {
		super();
		this.ni = ni;
		this.port=ni.PORTfichier;
	}

	protected ChatNI ni;
	
	/**
	 * Abstract run method.
	 * Will be implemented by TcpReceiver and TcpSender
	 */
	public abstract void run();
}
